<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
selection_test(
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-0 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">t|hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|t^hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-1 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">th|ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|th^ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-2 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">the|y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|the^y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-3 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they^ said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-4 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they ^said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-5 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they s|aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they s^aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-6 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they sa|id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they sa^id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-7 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they sai|d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they sai^d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-8 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said^ "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-9 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said ^"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-10 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "|\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "^\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-11 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202B|car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202B^car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-12 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bc|ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bc^ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-13 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bca|r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bca^r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-14 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar^ \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-15 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar ^\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-16 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3|\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3^\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-17 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4|\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4^\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-18 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."</div>',
  '18-19 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 ^\u05D0\u05D1\u05D2\u202C."</div>',
  '18-20 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0|\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0^\u05D1\u05D2\u202C."</div>',
  '18-21 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1|\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1^\u05D2\u202C."</div>',
  '18-22 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2|\u202C."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2^\u202C."</div>',
  '18-23 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C|."</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C^."</div>',
  '18-24 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C.|"</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C.^"</div>',
  '18-25 rtl backward lineboundary');
</script>
